<?php
require_once 'Interface.php';

/**
 * Observer object for an events system. Observers, by default, attach to an observable via a 'notify'
 * method. An attached, unhandlable event (uncallable custom handler on missing default function)
 * always causes an exception to be thrown.
 * 
 * @category Lead
 * @package Lead_Event
 * 
 */
abstract class Lead_Event_Observer_Abstract implements Lead_Event_Observer_Interface
{
	/**
	 * Override the default notify method.
	 *
	 * @param Observable $observable The object who triggered an event
	 * @param string $event Event name
	 * @param mixed $msg Message from event.
	 */
	public function notify(Observable $observable, $event, $msg = null)
	{
		throw new Lead_Event_Exception('Event unhandled.');
	}
	
}
?>